package ordinal.index;

/**
 *   用 EnumMap 代替序数索引
 *   香草
 */
public class Herb {
    // 香草类型枚举
    public enum TypeEnum { ANNUAL, PREENNIAL ,BIENNIAL}

    // 香草名称
    private final String name;
    private final TypeEnum type;

    public Herb(String name, TypeEnum type) {
        this.name = name;
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public TypeEnum getType() {
        return type;
    }

    @Override
    public String toString() {
        return this.name;
    }
}
